<!-- 开放管理-数据分析-课程接待人数 -->
<template>
  <div class="JNPF-common-layout">
    <div class="JNPF-common-layout-center">
      <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent>

        <el-col :span="6">
            <el-form-item label="统计年份">
              <el-select v-model="listQuery.fyear" placeholder="请选择"
                :disabled="$store.getters.userInfo.manufacturer">
                <el-option
                  v-for="item in options3"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="课程名称">
              <el-input v-model="listQuery.fuser" placeholder="请输入课程名称" clearable />
            </el-form-item>
          </el-col>

          <template v-if="showAll">
          <el-col :span="6">
            <el-form-item label="所属地区">
              <el-select v-model="listQuery.fcustomno" placeholder="请选择"
                :disabled="$store.getters.userInfo.manufacturer">
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="教育局">
              <el-select v-model="listQuery.fcustomno" placeholder="请选择"
                :disabled="$store.getters.userInfo.manufacturer">
                <el-option
                  v-for="item in options2"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>

        </template>

          <el-col :span="6">
            <el-form-item label="">
              <el-button type="primary" icon="el-icon-search" >查询</el-button>
              <!-- <el-button type="primary" icon="el-icon-plus" @click="insert(undefined)">新增</el-button> -->
              <el-button type="danger" icon="el-icon-download">导出</el-button>
              <el-button type="text" >单位:万人次</el-button>
              <el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">展开</el-button>
              <el-button type="text" icon="el-icon-arrow-up" @click="showAll = false" v-else>收起</el-button>
            </el-form-item>
          </el-col>
        </el-form>
      </el-row>
      <div class="JNPF-common-layout-main JNPF-flex-main">
        <JNPF-table :data="list" border v-loading="loading">
          <el-table-column prop="FAREA" label="所属地区" width="85"></el-table-column>
          <el-table-column prop="FCATNAME" label="课程名称" ></el-table-column>
          <el-table-column prop="F01" label="1月份" width="80"></el-table-column>
          <el-table-column prop="F02" label="2月份" width="80"></el-table-column>
          <el-table-column prop="F03" label="3月份" width="80"></el-table-column>
          <el-table-column prop="F04" label="4月份" width="80"></el-table-column>
          <el-table-column prop="F05" label="5月份" width="80"></el-table-column>
          <el-table-column prop="F06" label="6月份" width="80"></el-table-column>
          <el-table-column prop="F07" label="7月份" width="80"></el-table-column>
          <el-table-column prop="F08" label="8月份" width="80"></el-table-column>
          <el-table-column prop="F09" label="9月份" width="80"></el-table-column>
          <el-table-column prop="F10" label="10月份" width="80"></el-table-column>
          <el-table-column prop="F11" label="11月份" width="80"></el-table-column>
          <el-table-column prop="F12" label="12月份" width="80"></el-table-column>
        </JNPF-table>
        <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit"/>
      </div>
    </div>
  </div>
</template>
<script>
  import jnpf from "@/utils/jnpf"
  export default {
    name: 'shop',
    components: {  },
    data() {
      return {
        showAll: false,

        //所属教学楼选择数据
        options1: [{
          value: '20E01',
          label: '黄浦区'
        }, {
          value: '20E02',
          label: '静安区'
        }, {
          value: '20N03',
          label: '徐汇区'
        }, {
          value: '20E04',
          label: '宝山区'
        }],

        //所属楼层选择数据
        options2: [{
          value: '20E01',
          label: '黄浦区教育局'
        }, {
          value: '20E02',
          label: '静安区教育局'
        }, {
          value: '20N01',
          label: '宝山教育局'
        }, {
          value: '20N02',
          label: '闵行教育局'
        }],

        options3: [{
          value: '20E01',
          label: '2025'
        }, {
          value: '20E02',
          label: '2024'
        }, {
          value: '20N01',
          label: '2023'
        }, {
          value: '20N02',
          label: '2022'
        }, {
          value: '20N02',
          label: '2021'
        }],


        customlist:[
          {
            "FBILLNO": "K241130001", 
            "FBILLCREDATE":"2024-11-30",
            "FUSER": "曹操",
            "FMEMO": "有机化学实验操作课",
            "FBEGDATE": "2024-12-01",
            "FENDDATE": "2025-11-30",
            "FCHECKUSE": "",
            "FCHECKDATE": "",
            "fyear":"2025",
            "FBILLSTATE": "申请中"
          },
        ],
        list: [
            {
              "FAREA":"嘉定区",
              "FCATNO":"SH1001",
              "FCATNAME":"上海研学教育中心",
              "F01":2.56,
              "F02":3.75,
              "F03":1.75,
              "F04":0.75,
              "F05":3.75,
              "F06":5.75,
              "F07":2.75,
              "F08":1.75,
              "F09":3.75,
              "F10":0.75,
              "F11":3.75,
              "F12":2.75
            },{
              "FAREA":"青浦区",
              "FCATNO":"SH1001",
              "FCATNAME":"上海科技研学基地",
              "F01":2.56,
              "F02":3.75,
              "F03":1.75,
              "F04":0.75,
              "F05":3.75,
              "F06":5.75,
              "F07":2.75,
              "F08":1.75,
              "F09":3.75,
              "F10":0.75,
              "F11":3.75,
              "F12":2.75
            },
            ,{
              "FAREA":"崇明岛区",
              "FCATNO":"SH1001",
              "FCATNAME":"上海文化之旅研学机构",
              "F01":2.56,
              "F02":3.75,
              "F03":1.75,
              "F04":0.75,
              "F05":3.75,
              "F06":5.75,
              "F07":2.75,
              "F08":1.75,
              "F09":3.75,
              "F10":0.75,
              "F11":3.75,
              "F12":2.75
            },{
              "FAREA":"黄浦区",
              "FCATNO":"SH1001",
              "FCATNAME":"蓝湖营地教育冬令营",
              "F01":2.56,
              "F02":3.75,
              "F03":1.75,
              "F04":0.75,
              "F05":3.75,
              "F06":5.75,
              "F07":2.75,
              "F08":1.75,
              "F09":3.75,
              "F10":0.75,
              "F11":3.75,
              "F12":2.75
            },
        ],
        fbillcredate: [jnpf.dateFormat(new Date(), "YYYY-MM-DD"), jnpf.dateFormat(new Date(), "YYYY-MM-DD")],
        loading: false,
        total: 0,
        listQuery: {
          page: 1,
          limit: 20,
          sort: "desc",
          fyear: "2025",
          fbillstate: "",
          fbillno: "",
          begindate: undefined,
          enddate: undefined,
          fcustomno: ""
        },
      };
    },
    computed: {},
    methods: {
    },
  };
</script>